package com.loyom.navi.common;

import java.util.HashMap;
import java.util.Map;

import org.apache.velocity.app.VelocityEngine;
import org.springframework.ui.velocity.VelocityEngineUtils;

import com.loyom.navi.base.BaseObject;

public class MailUtils extends BaseObject {

    private static final long serialVersionUID = 1L;

    public void mail() {

        VelocityEngine velocityEngine = new VelocityEngine();
        String templateLocation = "mail/mail_template.vm";
        Map<String, Object> model = new HashMap<String, Object>();
        model.put("name", "xukai");
        String mail = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, templateLocation,
                model);

        System.out.println(mail);
    }
}
